3.1.92 \(\int (d+e x^n)^2 (a+b x^n+c x^{2 n})^p \, dx\) [92]

3.1.92.1 Optimal result
3.1.92.2 Mathematica [A] (verified)
3.1.92.3 Rubi [A] (verified)
3.1.92.4 Maple [F]
3.1.92.5 Fricas [F]
3.1.92.6 Sympy [F(-1)]
3.1.92.7 Maxima [F]
3.1.92.8 Giac [F(-2)]
3.1.92.9 Mupad [F(-1)]

3.1.92.1 Optimal result

Integrand size = 26, antiderivative size = 447 \[ \int \left (d+e x^n\right )^2 \left (a+b x^n+c x^{2 n}\right )^p \, dx=\frac {2 d e x^{1+n} \left (1+\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )^{-p} \left (1+\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )^{-p} \left (a+b x^n+c x^{2 n}\right )^p \operatorname {AppellF1}\left (1+\frac {1}{n},-p,-p,2+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{1+n}+\frac {e^2 x^{1+2 n} \left (1+\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )^{-p} \left (1+\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )^{-p} \left (a+b x^n+c x^{2 n}\right )^p \operatorname {AppellF1}\left (2+\frac {1}{n},-p,-p,3+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{1+2 n}+d^2 x \left (1+\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}\right )^{-p} \left (1+\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )^{-p} \left (a+b x^n+c x^{2 n}\right )^p \operatorname {AppellF1}\left (\frac {1}{n},-p,-p,1+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right ) \]

output
2*d*e*x^(1+n)*(a+b*x^n+c*x^(2*n))^p*AppellF1(1+1/n,-p,-p,2+1/n,-2*c*x^n/(b 
-(-4*a*c+b^2)^(1/2)),-2*c*x^n/(b+(-4*a*c+b^2)^(1/2)))/(1+n)/((1+2*c*x^n/(b 
-(-4*a*c+b^2)^(1/2)))^p)/((1+2*c*x^n/(b+(-4*a*c+b^2)^(1/2)))^p)+e^2*x^(1+2 
*n)*(a+b*x^n+c*x^(2*n))^p*AppellF1(2+1/n,-p,-p,3+1/n,-2*c*x^n/(b-(-4*a*c+b 
^2)^(1/2)),-2*c*x^n/(b+(-4*a*c+b^2)^(1/2)))/(1+2*n)/((1+2*c*x^n/(b-(-4*a*c 
+b^2)^(1/2)))^p)/((1+2*c*x^n/(b+(-4*a*c+b^2)^(1/2)))^p)+d^2*x*(a+b*x^n+c*x 
^(2*n))^p*AppellF1(1/n,-p,-p,1+1/n,-2*c*x^n/(b-(-4*a*c+b^2)^(1/2)),-2*c*x^ 
n/(b+(-4*a*c+b^2)^(1/2)))/((1+2*c*x^n/(b-(-4*a*c+b^2)^(1/2)))^p)/((1+2*c*x 
^n/(b+(-4*a*c+b^2)^(1/2)))^p)
 
3.1.92.2 Mathematica [A] (verified)

Time = 0.63 (sec) , antiderivative size = 338, normalized size of antiderivative = 0.76 \[ \int \left (d+e x^n\right )^2 \left (a+b x^n+c x^{2 n}\right )^p \, dx=\frac {x \left (\frac {b-\sqrt {b^2-4 a c}+2 c x^n}{b-\sqrt {b^2-4 a c}}\right )^{-p} \left (\frac {b+\sqrt {b^2-4 a c}+2 c x^n}{b+\sqrt {b^2-4 a c}}\right )^{-p} \left (a+x^n \left (b+c x^n\right )\right )^p \left (2 d e (1+2 n) x^n \operatorname {AppellF1}\left (1+\frac {1}{n},-p,-p,2+\frac {1}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}},\frac {2 c x^n}{-b+\sqrt {b^2-4 a c}}\right )+(1+n) \left (e^2 x^{2 n} \operatorname {AppellF1}\left (2+\frac {1}{n},-p,-p,3+\frac {1}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}},\frac {2 c x^n}{-b+\sqrt {b^2-4 a c}}\right )+d^2 (1+2 n) \operatorname {AppellF1}\left (\frac {1}{n},-p,-p,1+\frac {1}{n},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}},\frac {2 c x^n}{-b+\sqrt {b^2-4 a c}}\right )\right )\right )}{(1+n) (1+2 n)} \]

input
Integrate[(d + e*x^n)^2*(a + b*x^n + c*x^(2*n))^p,x]
 
output
(x*(a + x^n*(b + c*x^n))^p*(2*d*e*(1 + 2*n)*x^n*AppellF1[1 + n^(-1), -p, - 
p, 2 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c]), (2*c*x^n)/(-b + Sqrt[b^ 
2 - 4*a*c])] + (1 + n)*(e^2*x^(2*n)*AppellF1[2 + n^(-1), -p, -p, 3 + n^(-1 
), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c]), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])] 
 + d^2*(1 + 2*n)*AppellF1[n^(-1), -p, -p, 1 + n^(-1), (-2*c*x^n)/(b + Sqrt 
[b^2 - 4*a*c]), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])])))/((1 + n)*(1 + 2*n)* 
((b - Sqrt[b^2 - 4*a*c] + 2*c*x^n)/(b - Sqrt[b^2 - 4*a*c]))^p*((b + Sqrt[b 
^2 - 4*a*c] + 2*c*x^n)/(b + Sqrt[b^2 - 4*a*c]))^p)
 
3.1.92.3 Rubi [A] (verified)

Time = 0.61 (sec) , antiderivative size = 447, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.077, Rules used = {1766, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \left (d+e x^n\right )^2 \left (a+b x^n+c x^{2 n}\right )^p \, dx\)

\(\Big \downarrow \) 1766

\(\displaystyle \int \left (d^2 \left (a+b x^n+c x^{2 n}\right )^p+2 d e x^n \left (a+b x^n+c x^{2 n}\right )^p+e^2 x^{2 n} \left (a+b x^n+c x^{2 n}\right )^p\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle d^2 x \left (\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}+1\right )^{-p} \left (\frac {2 c x^n}{\sqrt {b^2-4 a c}+b}+1\right )^{-p} \left (a+b x^n+c x^{2 n}\right )^p \operatorname {AppellF1}\left (\frac {1}{n},-p,-p,1+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )+\frac {2 d e x^{n+1} \left (\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}+1\right )^{-p} \left (\frac {2 c x^n}{\sqrt {b^2-4 a c}+b}+1\right )^{-p} \left (a+b x^n+c x^{2 n}\right )^p \operatorname {AppellF1}\left (1+\frac {1}{n},-p,-p,2+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{n+1}+\frac {e^2 x^{2 n+1} \left (\frac {2 c x^n}{b-\sqrt {b^2-4 a c}}+1\right )^{-p} \left (\frac {2 c x^n}{\sqrt {b^2-4 a c}+b}+1\right )^{-p} \left (a+b x^n+c x^{2 n}\right )^p \operatorname {AppellF1}\left (2+\frac {1}{n},-p,-p,3+\frac {1}{n},-\frac {2 c x^n}{b-\sqrt {b^2-4 a c}},-\frac {2 c x^n}{b+\sqrt {b^2-4 a c}}\right )}{2 n+1}\)

input
Int[(d + e*x^n)^2*(a + b*x^n + c*x^(2*n))^p,x]
 
output
(2*d*e*x^(1 + n)*(a + b*x^n + c*x^(2*n))^p*AppellF1[1 + n^(-1), -p, -p, 2 
+ n^(-1), (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c]), (-2*c*x^n)/(b + Sqrt[b^2 - 4 
*a*c])])/((1 + n)*(1 + (2*c*x^n)/(b - Sqrt[b^2 - 4*a*c]))^p*(1 + (2*c*x^n) 
/(b + Sqrt[b^2 - 4*a*c]))^p) + (e^2*x^(1 + 2*n)*(a + b*x^n + c*x^(2*n))^p* 
AppellF1[2 + n^(-1), -p, -p, 3 + n^(-1), (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c] 
), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/((1 + 2*n)*(1 + (2*c*x^n)/(b - Sqr 
t[b^2 - 4*a*c]))^p*(1 + (2*c*x^n)/(b + Sqrt[b^2 - 4*a*c]))^p) + (d^2*x*(a 
+ b*x^n + c*x^(2*n))^p*AppellF1[n^(-1), -p, -p, 1 + n^(-1), (-2*c*x^n)/(b 
- Sqrt[b^2 - 4*a*c]), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/((1 + (2*c*x^n) 
/(b - Sqrt[b^2 - 4*a*c]))^p*(1 + (2*c*x^n)/(b + Sqrt[b^2 - 4*a*c]))^p)
 

3.1.92.3.1 Defintions of rubi rules used

rule 1766
Int[((d_) + (e_.)*(x_)^(n_))^(q_)*((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_ 
))^(p_), x_Symbol] :> Int[ExpandIntegrand[(d + e*x^n)^q*(a + b*x^n + c*x^(2 
*n))^p, x], x] /; FreeQ[{a, b, c, d, e, n, p, q}, x] && EqQ[n2, 2*n] && NeQ 
[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && ((IntegersQ[p, q] && 
!IntegerQ[n]) || IGtQ[p, 0] || (IGtQ[q, 0] &&  !IntegerQ[n]))
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 
3.1.92.4 Maple [F]

\[\int \left (d +e \,x^{n}\right )^{2} \left (a +b \,x^{n}+c \,x^{2 n}\right )^{p}d x\]

input
int((d+e*x^n)^2*(a+b*x^n+c*x^(2*n))^p,x)
 
output
int((d+e*x^n)^2*(a+b*x^n+c*x^(2*n))^p,x)
 
3.1.92.5 Fricas [F]

\[ \int \left (d+e x^n\right )^2 \left (a+b x^n+c x^{2 n}\right )^p \, dx=\int { {\left (e x^{n} + d\right )}^{2} {\left (c x^{2 \, n} + b x^{n} + a\right )}^{p} \,d x } \]

input
integrate((d+e*x^n)^2*(a+b*x^n+c*x^(2*n))^p,x, algorithm="fricas")
 
output
integral((e^2*x^(2*n) + 2*d*e*x^n + d^2)*(c*x^(2*n) + b*x^n + a)^p, x)
 
3.1.92.6 Sympy [F(-1)]

Timed out. \[ \int \left (d+e x^n\right )^2 \left (a+b x^n+c x^{2 n}\right )^p \, dx=\text {Timed out} \]

input
integrate((d+e*x**n)**2*(a+b*x**n+c*x**(2*n))**p,x)
 
output
Timed out
 
3.1.92.7 Maxima [F]

\[ \int \left (d+e x^n\right )^2 \left (a+b x^n+c x^{2 n}\right )^p \, dx=\int { {\left (e x^{n} + d\right )}^{2} {\left (c x^{2 \, n} + b x^{n} + a\right )}^{p} \,d x } \]

input
integrate((d+e*x^n)^2*(a+b*x^n+c*x^(2*n))^p,x, algorithm="maxima")
 
output
integrate((e*x^n + d)^2*(c*x^(2*n) + b*x^n + a)^p, x)
 
3.1.92.8 Giac [F(-2)]

Exception generated. \[ \int \left (d+e x^n\right )^2 \left (a+b x^n+c x^{2 n}\right )^p \, dx=\text {Exception raised: TypeError} \]

input
integrate((d+e*x^n)^2*(a+b*x^n+c*x^(2*n))^p,x, algorithm="giac")
 
output
Exception raised: TypeError >> an error occurred running a Giac command:IN 
PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Unable to divide, perhaps due to ro 
unding error%%%{-128,[1,0,5,3,6,4,1,6,0,2]%%%}+%%%{512,[1,0,5,3,6,4,0,7,1, 
1]%%%}+%%
 
3.1.92.9 Mupad [F(-1)]

Timed out. \[ \int \left (d+e x^n\right )^2 \left (a+b x^n+c x^{2 n}\right )^p \, dx=\int {\left (d+e\,x^n\right )}^2\,{\left (a+b\,x^n+c\,x^{2\,n}\right )}^p \,d x \]

input
int((d + e*x^n)^2*(a + b*x^n + c*x^(2*n))^p,x)
 
output
int((d + e*x^n)^2*(a + b*x^n + c*x^(2*n))^p, x)